<template>
  <div>
    <p>child</p>
    <div>
      <!-- <NuxtLink to="/about">跳转到about</NuxtLink> -->
      <NuxtLink :to="{ path: '/about', query: { id: 1, username: 'ikun' } }">
        跳转到about
      </NuxtLink>
    </div>
    <div>
      <NuxtLink to="/user-admin/1">跳转到User</NuxtLink>
    </div>
    <a-button @click="handleClick">编程式导航到about</a-button>
  </div>
</template>

<script setup lang="ts">
const router = useRouter()
const userInfo = {
  id: 1,
  username: '坤坤',
}
function handleClick() {
  router.push({
    path: '/about',
    query: userInfo,
  })
}
</script>

<style scoped></style>
